package cn.aticow.springboot.service;

import cn.aticow.springboot.bean.Task;
import cn.aticow.springboot.mapper.TaskMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service//该标注表明了该类是一个service层的类[该类是一个业务层的类]
public class TaskService{

    @Autowired//自动注入持久层的类[可以直接使用]
    TaskMapper taskMapper;

    public List<Task> findAllTask() {
        return taskMapper.findAllTask();
    }

    public int updateStatusById(Task task){
        return taskMapper.updateStatusById(task);
    }
}
